package com.qianyitian.hope2.spider.lego;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

/**
 *
 */
@Service("legoStorageService")
public class LegoStorageService {
    private Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private StringRedisTemplate redisTemplate;

    public LegoStorageService() {
    }

    public void store(String code, String country, String content) {
        redisTemplate.opsForValue().set(code + country, content);
    }

    public String get(String code, String country) {
        return redisTemplate.opsForValue().get(code + country);
    }
}
